<ul id="os-warper">
	<li><span class="ios-logo active"></span></li>
	<li><span class="winphone-logo"></span></li>
	<li><span class="android-logo active"></span></li>
	<li><span class="java-logo"></span></li>
</ul>
<div class="select-arrow android-active"></div>
<ul id="menu-list">
	<li><a href="/product">Mới nhất</a></li>
	<li><a href="/product?order=vote">Hot nhất</a></li>
	<li><a href="/product?order=download">Tải nhiều</a></li>
	<?php 
		$game_list = "";
		$app_list = "";
		$game_active = false;
		$app_active = false;
		if (isset( $this->arrParam['category_id'])){
			foreach ($this->arrParam['category_list'] as $category){
				if ($category['type'] == 1){
					if ($category['id'] == $this->arrParam['category_id']){
						$game_active = true;
					}
					$game_list .= "<li><a href = '/?category_id=" . $category["id"] . "'>" . $category['name'] . "</a></li>";
				}else{
					if ($category['id'] == $this->arrParam['category_id']){
						$app_active = true;
					}
					$app_list .= "<li><a href = '/?category_id=" . $category["id"] . "'>" . $category['name'] . "</a></li>";
				}
			}
		}else{
			foreach ($this->arrParam['category_list'] as $category){
				if ($category['type'] == 1){
					$game_list .= "<li><a href = '/?category_id=" . $category["id"] . "'>" . $category['name'] . "</a></li>";
				}else{
					$app_list .= "<li><a href = '/?category_id=" . $category["id"] . "'>" . $category['name'] . "</a></li>";
				}
			}
			
		}
	?>
	<li>
		<a class="<?php echo ($game_active)?"active":""?>" rel = "0">Kho game<span class="badge"></span></a>
		<?php if ($game_list) :?>
			<ul>
				<?php echo $game_list?>
			</ul>
		<?php endif;?>
	</li>
	<li>
		<a class="<?php echo ($app_active)?"active":""?>" rel = "0">Kho ứng dụng<span class="badge"></a>
		<?php if ($app_list) :?>
			<ul>
				<?php echo $app_list?>
			</ul>
		<?php endif;?>
		</li>
</ul>
<div id = "mennu-footer">
	<div>
		<div id="google_translate_element"></div>
		<div class="fb-like" data-href="<?php echo HOMEPAGE ?>" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
		<div class="g-plusone"></div>
		<div id="mennu-footer-copyright">&copy; 2013 storemobi.net</div>
	</div>
</div>
<div id="fb-root"></div>
<script>(function(d, s, id) {

//	Like, share, comment Facebook
	
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=1419147431677162&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

//Share, like G+ 

window.___gcfg = {lang: 'vi'};
(function() {
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  po.src = 'https://apis.google.com/js/platform.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();


//Google translate
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'vi', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
// Hiển thị menu
   	var show_menu = false;
	$( document ).ready(function() {
		$( "#icon_list" ).click(function() {
			if (show_menu == true) {
				$( "#right-menu" ).animate({left : "-85%"},1000);
				$( "#wrapper" ).animate({
					 marginLeft: "0"
					 }, 1000 );
				show_menu = false;
				$("#mennu-footer").hide();
			}else{
				$( "#right-menu" ).animate({left : "0"},1000);
				$( "#wrapper" ).animate({
					 marginLeft: "85%"
					 }, 1000 );
				show_menu = true;
				$("#mennu-footer").show();
			}
		});

		$("#menu-list > li").click(function(){
			$(this).children("ul").slideToggle();
			if ($(this).attr("rel") == 1) {
				$(this).attr("rel",0);
				$(this).children("a").children(".badge").removeClass("active");
			}else{
				$(this).attr("rel",1);
				$(this).children("a").children(".badge").addClass("active");
			}
		});
	});
	$("#mennu-footer").width($("#right-menu").width());
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>